package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ResPackageDishMapper;
import com.ruoyi.system.domain.ResPackageDish;
import com.ruoyi.system.service.IResPackageDishService;

/**
 * 菜品管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-02
 */
@Service
public class ResPackageDishServiceImpl implements IResPackageDishService 
{
    @Autowired
    private ResPackageDishMapper resPackageDishMapper;

    /**
     * 查询菜品管理
     * 
     * @param treeId 菜品管理主键
     * @return 菜品管理
     */
    @Override
    public ResPackageDish selectResPackageDishByTreeId(Long treeId)
    {
        return resPackageDishMapper.selectResPackageDishByTreeId(treeId);
    }

    /**
     * 查询菜品管理列表
     * 
     * @param resPackageDish 菜品管理
     * @return 菜品管理
     */
    @Override
    public List<ResPackageDish> selectResPackageDishList(ResPackageDish resPackageDish)
    {
        return resPackageDishMapper.selectResPackageDishList(resPackageDish);
    }

    @Override
    public List<ResPackageDish> selectResPackageDishListByResId(ResPackageDish resPackageDish, Long resId) {
        return resPackageDishMapper.selectResPackageDishListByResId(resPackageDish, resId);
    }

    @Override
    public List<ResPackageDish> selectResPackageDishListByUserId(ResPackageDish resPackageDish, Long userId) {
        return resPackageDishMapper.selectResPackageDishListByUserId(resPackageDish, userId);
    }

    @Override
    public List<ResPackageDish> selectResPackageDishListByPackageId(ResPackageDish resPackageDish, Long packageId) {
        return resPackageDishMapper.selectResPackageDishListByPackageId(resPackageDish, packageId);
    }

    /**
     * 新增菜品管理
     * 
     * @param resPackageDish 菜品管理
     * @return 结果
     */
    @Override
    public int insertResPackageDish(ResPackageDish resPackageDish)
    {
        return resPackageDishMapper.insertResPackageDish(resPackageDish);
    }

    /**
     * 修改菜品管理
     * 
     * @param resPackageDish 菜品管理
     * @return 结果
     */
    @Override
    public int updateResPackageDish(ResPackageDish resPackageDish)
    {
        return resPackageDishMapper.updateResPackageDish(resPackageDish);
    }

    /**
     * 批量删除菜品管理
     * 
     * @param treeIds 需要删除的菜品管理主键
     * @return 结果
     */
    @Override
    public int deleteResPackageDishByTreeIds(Long[] treeIds)
    {
        return resPackageDishMapper.deleteResPackageDishByTreeIds(treeIds);
    }

    /**
     * 删除菜品管理信息
     * 
     * @param treeId 菜品管理主键
     * @return 结果
     */
    @Override
    public int deleteResPackageDishByTreeId(Long treeId)
    {
        return resPackageDishMapper.deleteResPackageDishByTreeId(treeId);
    }
}
